
<%@ page import="com.edusite.Avisos" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="mainProfe" />
        <g:set var="entityName" value="${message(code: 'avisos.label', default: 'Avisos')}" />
        <title><g:message code="default.list.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/home/indice')}">Home</a></span>

        </div>
        <div class="body">
            <h1>Avisos</h1>
            
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr>
                        
                            <g:sortableColumn property="id" title="${message(code: 'avisos.id.label', default: 'Id')}" />
                        
                            <th><g:message code="avisos.enviadopor.label" default="Enviadopor" /></th>
                   	    
                            <g:sortableColumn property="asunto" title="${message(code: 'avisos.asunto.label', default: 'Asunto')}" />
                        
                            <g:sortableColumn property="texto" title="${message(code: 'avisos.texto.label', default: 'Texto')}" />
                        
                            <g:sortableColumn property="tipo" title="${message(code: 'avisos.tipo.label', default: 'Tipo')}" />
                        
                            <th><g:message code="avisos.asignatura.label" default="Asignatura" /></th>
                   	    
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${avisosInstanceList}" status="i" var="avisosInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        
                            <td><g:link action="showPublic" id="${avisosInstance.id}">${fieldValue(bean: avisosInstance, field: "id")}</g:link></td>
                        
                            <td>${fieldValue(bean: avisosInstance, field: "enviadopor")}</td>
                        
                            <td>${fieldValue(bean: avisosInstance, field: "asunto")}</td>
                        
                            <td>${fieldValue(bean: avisosInstance, field: "texto").decodeHTML()}</td>
                        
                            <td>${fieldValue(bean: avisosInstance, field: "tipo")}</td>
                        
                            <td>${fieldValue(bean: avisosInstance, field: "asignatura")}</td>
                        
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${avisosInstanceTotal}" />
            </div>
        </div>
    </body>
</html>
